package messagesPacks;

import java.util.Hashtable;

import Entity.Book;
import messagesPacks.GenericMessage.msgType;

/**
 * This class representing a LibrarianAddBookMessage
 * Date: 29/12/2012
 * @author Tali
 *
 */

public class LibrarianAddBookMessage extends GenericMessage
{

	 private static final long serialVersionUID = 1L;
		
	    /**Book is entity that includes all the details of book*/
	    private Book book;
	    /**Hashtable-BookSubjects saves all the subjects of book*/
	    private Hashtable<Integer,String> BookSubjects; 
		/**save the Query result*/
	    private int queryAddBookResult=-10 ;
		
		
	 
/**
* Constructor the LibrarianAddBookMessage with default values
*/		

		public LibrarianAddBookMessage()
		{
			this.type = msgType.LibrarianAddBookMSG; 
			this.book= new Book();
			BookSubjects = new Hashtable<Integer,String>();
		}
		
		
//====================================================================================	
//      Getters & Setters
//
		
		public Book getBook()
		{
			return this.book;
		}

		public void setBook(Book book) 
		{
			this.book = book;
		}

		public int getQueryLibAddBookResult()
		{
			return queryAddBookResult;
		}


		public void setQueryLibAddBookResult (int queryAddBookResult)
		{
			this.queryAddBookResult = queryAddBookResult;
		}

		public Hashtable<Integer,String> getBookSubjects()
		{
			return this.BookSubjects;
		}
		
		public void setBookSubjects(Hashtable<Integer,String> subjects)
		{
			if(!subjects.isEmpty())
			  {
				this.BookSubjects.putAll(subjects)  ; 
			  }
		}
		

}


